<template>
  <div>这里是pinia传过来的数据{{num}}
  </div>
   <button @click="add">同步添加+</button>
    <button @click="reduces">这里是异步添加+</button>
</template>
<script setup>
import { useStore} from '../store/index.js';
import { computed,ref} from 'vue'
let flag = ref(false)
let storenum = useStore()
let num = computed(()=>{
  return storenum.num
})
let add =()=>{
  storenum.addNum()
}
let reduces=()=>{
  storenum.reduce()
}
</script>

<style>

</style>